/*
- Malt Project - error.hpp
- This document is protected by the GPL protocol.
- Writer:@Index-Flandre
*/

#ifndef MALT_ERROR_H
#define MALT_ERROR_H

#include "./string.hpp"
#include <exception>

namespace malt
{

struct Error : public BoxObject, public std::exception
{
	String *ErrName;
	String *ErrBody;

	Error();
	Error(String *Name, String *Body);
	Error(const Error &obj);
	bool eq(Object *obj);
	void repl_print();
	void marking();
};

char *CopyStr(const char *);
void ErrorInit();

extern Error *merrno;
extern Error
		RuntimeError,
		SyntexError,
		ArgsLengthError;
}

#endif